﻿using System.Diagnostics;

namespace ReactiveOAuth
{

    /// <summary>
    /// Represents OAuth Token.
    /// </summary>
    [DebuggerDisplay("Key = {Key}, Secret = {Secret}")]
    public abstract class Token
    {

        /// <summary>Gets the Token Key.</summary>
        public string Key { get; private set; }

        /// <summary>Gets the Token Secret.</summary>
        public string Secret { get; private set; }

        /// <summary>
        /// Initialize a new Token.
        /// </summary>
        /// <param name="key">Token Key.</param>
        /// <param name="secret">Token Secret.</param>
        protected Token(string key, string secret)
        {
            Guard.ArgumentNull(key, "key");
            Guard.ArgumentNull(secret, "secret");

            Key = key;
            Secret = secret;
        }

    }

    /// <summary>
    /// Represents OAuth AccessToken.
    /// </summary>
    public class AccessToken : Token
    {

        /// <summary>
        /// Initialize a new Access Token.
        /// </summary>
        /// <param name="key">Token Key.</param>
        /// <param name="secret">Token Secret.</param>
        public AccessToken(string key, string secret)
            : base(key, secret)
        { }

    }

    /// <summary>
    /// Represents OAuth RequestToken.
    /// </summary>
    public class RequestToken : Token
    {

        /// <summary>
        /// Initialize a new Request Token.
        /// </summary>
        /// <param name="key">Token Key.</param>
        /// <param name="secret">Token Secret.</param>
        public RequestToken(string key, string secret)
            : base(key, secret)
        { }

    }

}